define([path.detail.html, path.detail.css], function (page, css) {

    var click = {
        wxxz: function () {
            layer.open({
                skin: 'tatoo',
                title: '客服微信号',
                content: '<h2>' + 'liuhuijx1004' + '</h2><p>长按上面文字复制</p>',
                shade: 0.3,
                shadeClose: true,
                closeBtn: false,
                btn: []
            });
        }
    };

    return {
        init: function (params) {
            ex.jsonp({
                debug: true,
                url: path.api + 'V3.0.0/Commodity/info',
                method: 'GET',
                data: {
                    _id: params.id
                },
                success: function (obj) {

                    if (obj.code == 0) {
                        var data = obj.data.commodityInfo;
                        cache.loadEqList(function (list) {
                            $('#page').html(juicer(page, {info: data, list: list}));
                            $('[data-click]').each(function () {
                                $(this).click(click[$(this).attr('data-click')]);
                            });
                        });
                        document.title = data.title;
                    }

                }
            });
        }
    }
});